import httpx
import asyncio

async def fetch_data():
    async with httpx.AsyncClient(timeout=30) as client:
        try:
            response = await client.get('https://www.example.com')
            print(f"Status code: {response.status_code}")
            print(f"Response content: {response.text}")
        except httpx.TimeoutException:
            print("Request timed out")

asyncio.run(fetch_data())


print(httpx.get("https://www.baidu.com").text)
